package com.db.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@WebServlet("/selectData")
public class SelectDataRelay extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        request.setCharacterEncoding("utf-8");

        String type = request.getParameter("condition");
        String value = request.getParameter("content");
        HttpSession session = request.getSession();
        session.setAttribute("type",null);
        session.setAttribute("value",null);

        request.setAttribute("type",type);
        request.setAttribute("value",value);
        request.getRequestDispatcher("/selectPerson").forward(request,response);
    }
}
